
@extends('layouts.master')

@section("css")
        @parent
@stop

@section("body")
<div class="row">
    <div class="col-md-12">
        <!-- BASIC TABLE -->
        <div class="panel">
            <div class="panel-heading">
                <h3 class="panel-title">操作记录</h3>
            </div>
            <div class="panel-body">
                <table class="table table-hover">
                    <thead>
                        <tr>
                            <th>编号</th>
                            <th>用户</th>
                            <th>操作记录</th>
                            <th>操作时间</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach($logs as $log)
                        <tr>
                            <td>{{$log['id']}}</td>
                            <td>{{$log['user_name']}}</td>
                            <td>{{$log['log']}}</td>
                            <td>{{$log['created_at']}}</td>
                        </tr>
                        @endforeach
                    </tbody>
                </table>
            </div>
        </div>
        <!-- END BASIC TABLE -->
    </div>
</div>

<div class="row">
    <div class="list_page col-md-12">
        <div class="panel">
            <div class="panel-body">
                <div class="pages_div" style="text-align: center">
                    <ul id="prePagination" class="next_pre_page pagination">
                        <li><a href="{{$logs->previousPageUrl()}}">&laquo;</a></li>
                    </ul>
                    <ul id="pagination" class="pagination">
                        @for($i=1;$i<=ceil($logs->total()/$logs->perPage());$i++)
                            <li style="display: none;" 
                                @if($logs->currentPage() == $i)
                                    class="active"
                                @endif
                            ><a href="{{$logs->url($i)}}">{{$i}}</a></li>
                        @endfor
                    </ul>
                    <ul id="nextPagination" class="next_pre_page pagination">
                        <li><a href="{{$logs->nextPageUrl()}}">&raquo;</a></li>
                    </ul>
                    <ul class="pagination">
                        <li>
                            <a href="#">共{{$logs->total()}}条记录</a>
                        </li>
                    </ul>
                </div>
                <div class="page_hide">
                    <!-- 数据总数 -->
                    <input id="totle_page" type="hidden" name="" value="{{$logs->total()}}">
                    <!-- 每页显示数据条数 -->
                    <input id="per_page" type="hidden" name="" value="{{$logs->perPage()}}">
                    <!-- 当前页 -->
                    <input id="current_page" type="hidden" name="" value="{{$logs->currentPage()}}">

                    <input id="previous_page_url" type="hidden" name="" value="{{$logs->previousPageUrl()}}">

                    <input id="next_page_url" type="hidden" name="" value="{{$logs->nextPageUrl()}}">
                </div>
            </div>
        </div>
    </div>
</div>
@stop

@section("js")
        @parent
        <script type="text/javascript" src="/js/pages/admin/public/page.js"></script>
@stop